﻿using System.Collections.Generic;
using System.Linq;

namespace Yuchen.NPA.Core.CompilerService.Method
{
    /// <summary>
    /// 方法的词法分析器
    /// </summary>
    public class Lexer
    {
        public static readonly string[] CALCOPERATORS = new string[] { "Is", "Equals", "NotEquals", "Between", "NotBetween", "LessThan", "LessThanEqual", "GreaterThan", "GreaterThanEqual", "After", "Before", "IsNull", "IsNotNull", "NotNull", "Like", "NotLike", "StartsWith", "NotStartsWith", "NotEndsWith", "EndsWith", "Contains", "NotContains", "OrderBy", "In", "NotIn", "True", "False", "IgnoreCase", "Descending" }.OrderByDescending(x => x.Length).ToArray();
        public static readonly string[] LOGICOPERATORS = new string[] { "And", "Or" }.OrderByDescending(x => x.Length).ToArray();

        public static readonly string[] OPERATORS = CALCOPERATORS.Union(LOGICOPERATORS).ToArray();
        //private static readonly string regex;
        void IsEOL(int i)
        {
          //  return method.Length <= i + 1;
        }

        //public Token0
    }
}
